package pojo.Homework

object MyClass04 {
  def main(args: Array[String]): Unit = {
    val student4: Student4 = new Student4("赵敏", 20)
    println(student4.name)
    println(student4.age)
  }

  class Student4(var name: String = "张无忌", var age: Int = 25, address: String = "天津") {
    println("student4主构造器初始化")

    def this(name: String, age: Int) {
      this()
      this.name = name
      this.age = age
    }
  }


}
